package com.framework.workflow.strategy;

import com.framework.workflow.dto.NodeProperty;
import org.apache.commons.lang3.ObjectUtils;

import java.util.List;
import java.util.Map;

public class AssigneeFilterContext {
    private IAssigneeFilterStrategy strategy;

    public AssigneeFilterContext(IAssigneeFilterStrategy strategy) {
        this.strategy = strategy;
    }

    public void filter(List<String> users, Map<String, Object> variables, NodeProperty nodeProperty) {
        if (ObjectUtils.isEmpty(variables)) {
            return;
        }
        if (null != strategy) {
            strategy.filter(users, variables, nodeProperty);
        }
    }
}
